package com.bai.ruiji.Common;

import java.util.List;

/**
 * 基于ThreadLocal封装的工具类，用于用户保存和获取当前登录用户的id
 * @author 27471
 * Time : 2022/10/9 17:54
 */
public class BaseContext {
    private static ThreadLocal<Long> threadLocal=new ThreadLocal<>();

    public static void setCurrentId(Long id){
        threadLocal.set(id);
    }

    public static Long getCurrentId(){
       return threadLocal.get();
    }
}
